package feeinterface.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.ulwx.tool.DbUtils;

import feeinterface.modeldb.ServiceCoClosePacket;

public class ServiceCoClosePacketDao {
	private static final Logger log = Logger
			.getLogger(ServiceCoClosePacketDao.class);

	public static boolean packetCloseInServiceCo(int coid, String packetid) {

		try {
			String sql = "select * from ServiceCoClosePacket "
					+ "where ServiceCoID=? and PacketID=?";
			Map<Integer, Object> map = new HashMap<Integer, Object>();
			map.put(1, coid);
			map.put(2, packetid);
			List<ServiceCoClosePacket> list = DbUtils.doQueryClass(null,
					ServiceCoClosePacket.class, sql, map);
			if (list.size() > 0) {
				return true;
			}
			return false;
		} catch (Exception e) {
			log.error("", e);
		}
		return false;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
